package BNS.plumbing;

import javax.swing.JComponent;
import javax.swing.JTextArea;

class TextPersona extends BNSPersona {
	/**
   * 
   */
  private static final long serialVersionUID = 1L;
  //private JTextArea ta;
	private String msg1;
	private JTextArea panel;
	
	public TextPersona(String msg) {
		msg1= msg;
		}
	
	public JComponent startPanel() {
		panel= new JTextArea(msg1+"\n",23,50);
		return panel;
		}
	
	public JComponent killPanel() {
		return panel;
		}
	
	public void gameUpdate(java.io.Serializable dataBlob) {
		if (dataBlob==null) return;
		String message= null;
		try { message= (String)dataBlob; }
		catch(Exception e) { System.err.println("TextPersona datablob ERROR: "+dataBlob); }
		//System.err.println("Text: "+message);
		panel.append(message);
		panel.repaint();
		}
	
	public String getTitle() { return "TextPersona"; }
	
	} // EOC TextPersona
